$script(window.global.plugin+'/tool/ua-parser/dist/ua-parser.min.js','ua-parser', function() {
	try {
		var parser = new UAParser();
		var result =  parser.getResult() || {};
		result.url = location.href;
		result.referrer = document.referrer;
		result.path = window.location.pathname;
		result.domain = window.location.host;
		result.resolution = parseInt(screen.width)+'x'+parseInt(screen.height);
		result.devicePixelRatio = parseInt(window.devicePixelRatio);
		//console.log(JSON.stringify(result));
		//submitlog(result);
	} catch (e) {
		// TODO: handle exception
	}
});
var UNDEF_TYPE = 'undefined';
function submitlog(result){
    var $ = window.jQuery || window.Zepto;
    if (typeof $ !== UNDEF_TYPE) {
		$.ajax({  
	        type: "POST",  
	        contentType : "application/json",  
	        dataType:'JSON',
	        url:window.global.ctx+"/common/log",  
	        data:JSON.stringify(result)
	    });
    }else{
    	setTimeout(function(){
    		submitlog(result);
    	},100);
    }
}